package main

import "fmt"

/*
运算符
*/
func main() {
	for i := 0; i < 10; i++ {
		if i == 2 {
			break
		}
		fmt.Printf("%d\n", i)
	}
	fmt.Println("----------------------------------------------")
	for i := 0; i < 10; i++ {
		if i == 2 {
			continue
		}
		fmt.Printf("%d\n", i)
	}
	fmt.Println("----------------------------------------------")

lable1:
	for i := 0; i < 10; i++ {
		for j := 0; j < 10; j++ {
			if j == 2 {
				break lable1
			}
			fmt.Printf("%d %d\n", i, j)
		}
	}
	fmt.Println("----------------------------------------------")

lable2:
	for i := 0; i < 2; i++ {
		for j := 0; j < 5; j++ {
			if j == 2 {
				continue lable2
			}
			fmt.Printf("%d %d\n", i, j)
		}
	}
	if a := 3; a > 2 {
		goto lable3
	}
	fmt.Println("---------------------A-------------------------")
	fmt.Println("---------------------B-------------------------")
lable3:
	fmt.Println("---------------------C-------------------------")
	fmt.Println("---------------------D-------------------------")
}
